import request from '@/utils/request';
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询出库列表
export function listShipments(query) {
  return request({
    url: '/shipments/shipments/list',
    method: 'get',
    params: query
  })
}

// 查询出库详细
export function getShipments(shipmentsId) {
  return request({
    url: '/shipments/shipments/' + parseStrEmpty(shipmentsId),
    method: 'get'
  })
}

// 新增出库
export function addShipments(data) {
  return request({
    url: '/shipments/shipments',
    method: 'post',
    data: data
  })
}

// 修改出库
export function updateShipments(data) {
  return request({
    url: '/shipments/shipments',
    method: 'put',
    data: data
  })
}

// 删除出库
export function delShipments(shipmentsId) {
  return request({
    url: '/shipments/shipments/' + shipmentsId,
    method: 'delete'
  })
}
